package com.jbinfo.qingcaowan.dao;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;

import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.jbinfo.qingcaowan.common.DataProcessException;

/**
 * 
* @ClassName: SimpleDao 
* @Description: TODO 基础Dao接口类
* @author ZhangLei
* @date 2016年5月24日 上午10:03:42
 */
public interface SimpleDao {
	public int insert(Object parameterObject) throws DataProcessException;

	public int insertBatch(Object parameterObject) throws DataProcessException;

	public int delete(String sqlName, Object parameterObject) throws DataProcessException;

	public int deleteById(Object id) throws DataProcessException;

	public int update(Object parameterObject) throws DataProcessException;

	public Object select(String sqlName, Object parameterObject) throws DataProcessException;

	public Object selectByPrimaryKey(Object id) throws DataProcessException;

	public List<?> selectByMap(Map<String, Object> params) throws DataProcessException;

	public List<?> selectForList(String sqlName, Object parameterObject) throws DataProcessException;

	public List<?> selectObjForList(String sqlName, Object parameterObject) throws DataProcessException;

	public Map<?, ?> selectForMap(String sqlName, String mapKey) throws DataAccessException;

	public Map<?, ?> selectForMap(String sqlName, Object parameterObject, String mapKey) throws DataAccessException;

	public List<Map<?, ?>> selectForMapList(String sqlName, Object parameterObject, String mapKey) throws DataAccessException;

	public List<?> selectForPageList(String sqlName, Map<String, Object> params, int pageIndex, int pageSize)
			throws DataAccessException;
	
	public List<?> selectForPageListN(String sqlName, Object parameterObject, int pageIndex, int pageSize)
			throws DataAccessException;
	public List<?> selectForPageListN2(String sqlName, Object parameterObject, PageBounds pageBounds)
			throws DataAccessException;

	public Integer selectForCount(String sqlName, Map<String, Object> params) throws DataAccessException;

	public int update(String sqlName, Object parameterObject) throws DataProcessException;
}